package com.yunxi.activiti.service;

import com.github.pagehelper.PageInfo;
import com.yunxi.activiti.pojo.ActivitiManageVO;
import com.yunxi.activiti.pojo.ActivitiResult;
import com.yunxi.activiti.pojo.ActivitiTaskVO;
import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.LoginInfo;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 * @author
 * @since 2019-07-15
 */
public interface ActivitiManageDubboService {

    ActivitiManageVO getById(Long id) throws InvocationTargetException, IllegalAccessException;

    void saveOrUpdate(ActivitiManageVO activitiManageVO) throws InvocationTargetException, IllegalAccessException;

    void removeById(Long id);

    PageInfo<ActivitiManageVO> findPageByVO(ActivitiManageVO activitiManageVO, Integer pageNum, Integer pageSize) throws InvocationTargetException, IllegalAccessException;

    void removeByListVo(List<ActivitiManageVO> activitiManageVOList) throws IllegalAccessException, InvocationTargetException, InstantiationException;

    List listByVo(ActivitiManageVO activitiManageVO);

    ApiResult deployModel(ActivitiManageVO activitiManageVO);

    ApiResult start(ActivitiManageVO am, LoginInfo user);

    ApiResult start(String activitiCode,String businessKey, LoginInfo user);

    ApiResult next(ActivitiManageVO am, LoginInfo user);

    ApiResult next(String instanceId,String taskId, String taskStatus, LoginInfo user);

    ApiResult next(String instanceId,String taskId, String taskStatus, LoginInfo user,String remark);

    ApiResult pageWait(ActivitiManageVO am, LoginInfo user);

    ApiResult last(ActivitiManageVO am, LoginInfo user);

    ActivitiResult next(String businessKey, String taskStatus, LoginInfo user);

    List listRecordByBusinessKey(String businessKey);

    ApiResult stopActivitiByBusinessKey(String businessKey);

    List listByInstanceId(String instanceId);

    ActivitiResult next2step(String businessKey, String taskStatus, LoginInfo user, String nextTaskName);

    ActivitiTaskVO getCurTaskIdByBusinessKey(String orderCustomerId);

    String getInstanceIdByBusinessKey(String orderCustomerId);

    List listRecordByInstanceId(String instanceId);

    List<ActivitiTaskVO> listInstanceNodeByBusinessKey(String businessKey);

    List<ActivitiTaskVO> listInstanceNodeByInstanceId(String instanceId);

    ActivitiTaskVO getTaskByTaskId(String taskId);

    ActivitiTaskVO getHisTaskByTaskId(String taskId);
}
